<!DOCTYPE html>
<html lang="zh-CN">

<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
<title>面向研究团队的参考文献管理与服务分布式系统</title>

<!-- Bootstrap -->
<link href="css/bootstrap.css" rel="stylesheet">
<!--内部样式-->
<style type="text/css">
p {
	text-align: justify;
	text-indent: 32px;
	font-size: 16px;
	margin-right: 15px;
	line-height: 24px;
	color: #000000;
}
</style>
<script src="js/angular.min.js"></script>
<script src="js/angular-cookies.min.js"></script>
<script>
		function updateEmail() {
			alert($("#userno").val())
		}
	</script>
</head>

<body>
	<div class="container">
		<div class="row" style="background-color: #005BAC; height: 130px;">
			<div style="line-height: 130px;" class="col-md-4">
				<img src="images/logo.png">
			</div>
			<div
				style="line-height: 130px; color: white; font-size: 28px; font-family: '微软雅黑';"
				class="col-md-8">面向研究团队的参考文献管理与服务分布式系统</div>
		</div>
		<div
			style="height: 35px; background-color: #C6DEEB; border: 1px solid darkgrey; align: center;"
			class="row">
			<p
				style="text-align: center; line-height: 35px; text-indent: 0px; margin-left: 5px; font-size: 16px; color: #0066B3; font-family: '微软雅黑'; font-weight: bold;">独立团队及独立管理员注册信息</p>
		</div>
		<div class="row " style="border: 1px solid #C6DEEB">
			<div class="col-md-6">
				<label>注册完成后，请联系 <a href="javascript:void(0);"
					onclick="showTips()">我们</a> 进行激活
				</label>
			</div>
		</div>
		<div style="border: 1px solid darkgrey;" class="row">
			<div class="col-md-6" style="border: 1px solid #C6DEEB">
				<div class="col-md-1"></div>
				<div class="col-md-11">
					<div class="form-group"
						style="background-color: #eea200; color: white; width: 38%; top: 10px; position: relative; text-align: center;">
						<span style="font-size: large; font-family: '宋体'">注册团队信息</span>
					</div>
					<div class="row">
						<div class="col-xs-5">
							<div class="form-group  has-feedback">
								<label>团&nbsp;&nbsp;队&nbsp;&nbsp;号:&nbsp;</label>
								<div class="input-group" style="width: 100%">
									<input id="teamno" class="form-control" maxlength="9"
										type="text" readonly>
								</div>
							</div>
						</div>
						<div class="col-xs-5"
							style="font-size: 14px; padding: 32px 0px 0px 35px">
							请记下您的团队号</div>
					</div>
					<div class="row">
						<div class="col-xs-5">
							<div class="form-group   has-feedback">
								<label for="teamname">团&nbsp;&nbsp;队&nbsp;&nbsp;名:&nbsp;</label>
								<div class="input-group" style="width: 100%">
									<input id="teamname" class="form-control" maxlength="20"
										type="text" onblur="checkteamname()"
										onfocus="clearScreen('teamnameErr')">
								</div>
							</div>
						</div>
						<div class="col-xs-5"
							style="font-size: 14px; padding: 32px 0px 0px 35px">请输入不超过10位字符</div>
						<div class="col-xs-2 text-center"
							style="color: red; font-size: 5px; padding: 32px 0px 0px 0px">
							<div id="teamnameErr" class="errTxt"></div>
						</div>
					</div>
					<div class="row">
						<div class="col-xs-5">
							<div class="form-group   has-feedback">
								<label for="max">最大用户数:</label>
								<div class="input-group" style="width: 100%">
									<input id="max" class="form-control" maxlength="6" type="text"
										onblur="checkmax()" onfocus="clearScreen('maxErr')" value="1" readonly>
								</div>
							</div>
						</div>
						<div class="col-xs-5"
							style="font-size: 14px; padding: 32px 0px 0px 35px">
							请输入不超过100的数字</div>
						<div class="col-xs-2 text-center"
							style="color: red; font-size: 5px; padding: 32px 0px 0px 0px">
							<div id="maxErr" class="errTxt"></div>
						</div>
					</div>
					<!-- <div class="row">
						<div class="col-xs-5">
							<div class="form-group   has-feedback">
								<label for="teamemail">团队Email:</label>
								<div class="input-group" style="width: 100%">
									<input id="teamemail" class="form-control" maxlength="6"
										type="text" onblur="checkTeamEmail()"
										onfocus="clearScreen('teamemailErr')"
										value="" readonly>
								</div>
							</div>
						</div>
						<div class="col-xs-5"
							style="font-size: 14px; padding: 32px 0px 0px 35px">
							禁用</div>
						<div class="col-xs-2 text-center"
							style="color: red; font-size: 5px; padding: 32px 0px 0px 0px">
							<div id="teamemailErr" class="errTxt"></div>
						</div>
					</div> -->

				</div>
			</div>
			<div class="col-md-6" style="border: 1px solid #C6DEEB">
				<div class="col-md-1"></div>
				<div class="col-md-11">

					<div class="form-group"
						style="background-color: #eea200; width: 38%; color: white; top: 10px; position: relative; text-align: center;">
						<span style="font-family: '宋体'; font-size: large">独立管理员信息</span>
					</div>
					<div class="row">
						<div class="col-xs-5">
							<div class="form-group  has-feedback">
								<label for="userno">用&nbsp;&nbsp;户&nbsp;&nbsp;号:&nbsp;</label>
								<div class="input-group" style="width: 115%">
									<input id="userno" class="form-control" maxlength="9"
										type="text" readonly>
								</div>
							</div>
						</div>
						<div class="col-xs-5"
							style="font-size: 14px; padding: 32px 0px 0px 65px">
							请记下您的登录账号</div>
						<!-- <div class="col-xs-2 text-center"
							style="color:red;font-size:5px;padding:32px 0px 0px 0px">
							<div id="emailErr6" class="errTxt"></div>
						</div> -->
					</div>
					<div class="row">
						<div class="col-xs-5">
							<div class="form-group   has-feedback">
								<label for="username">用&nbsp;&nbsp;户&nbsp;&nbsp;名:&nbsp;</label>
								<div class="input-group" style="width: 115%">
									<input id="username" class="form-control" maxlength="20"
										type="text" onblur="checkusername()"
										onfocus="clearScreen('usernameErr')">
								</div>
							</div>
						</div>
						<div class="col-xs-5"
							style="font-size: 14px; padding: 32px 0px 0px 65px">请输入1到10位字符</div>
						<div class="col-xs-2 text-center"
							style="color: red; font-size: 5px; padding: 32px 0px 0px 0px">
							<div id="usernameErr" class="errTxt"></div>
						</div>
					</div>

					<div class="row">
						<div class="col-xs-5">
							<div class="form-group   has-feedback">
								<label for="password">密&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;码:&nbsp;</label>
								<div class="input-group" style="width: 115%">
									<input id="password" class="form-control" maxlength="8"
										type="password" onblur="checkpas()"
										onfocus="clearScreen('passwordErr')">
								</div>
							</div>
						</div>
						<div class="col-xs-5"
							style="font-size: 14px; padding: 32px 0px 0px 65px">
							请输入4到8位字符</div>
						<div class="col-xs-2 text-center"
							style="color: red; font-size: 5px; padding: 32px 0px 0px 0px">
							<div id="passwordErr" class="errTxt"></div>
						</div>
					</div>
					<div class="row">
						<div class="col-xs-5">
							<div class="form-group   has-feedback">
								<label for="password2">确&nbsp;认&nbsp;密&nbsp;码:</label>
								<div class="input-group" style="width: 115%">
									<input id="password2" class="form-control" maxlength="8"
										 type="password" onblur="checkpas2()"
										onfocus="clearScreen('password2Err')">
								</div>
							</div>
						</div>
						<div class="col-xs-5"
							style="font-size: 14px; padding: 32px 0px 0px 65px">密码须和第一次相同</div>
						<div class="col-xs-2 text-center"
							style="color: red; font-size: 5px; padding: 32px 0px 0px 0px">
							<div id="password2Err" class="errTxt"></div>
						</div>
					</div>
					<div class="row">
						<div class="col-xs-5">
							<div class="form-group   has-feedback">
								<label for="idnum">身&nbsp;份&nbsp;证&nbsp;号:</label>
								<div class="input-group" style="width: 115%">
									<input id="idnum" class="form-control" maxlength="30" size="30"
										type="text" onblur="checkId()"
										onfocus="clearScreen('idnumErr')">
								</div>
							</div>
						</div>
						<div class="col-xs-5"
							style="font-size: 14px; padding: 32px 0px 0px 65px">请输入18位数字或字符</div>
						<div class="col-xs-2 text-center"
							style="color: red; font-size: 5px; padding: 32px 0px 0px 0px">
							<div id="idnumErr" class="errTxt"></div>
						</div>
					</div>
					<div class="row">
						<div class="col-xs-5">
							<div class="form-group   has-feedback">
								<label for="phonenum">手&nbsp;机&nbsp;号&nbsp;码:</label>
								<div class="input-group" style="width: 115%">
									<input id="phonenum" class="form-control" maxlength="11"
										type="text" onblur="checkTel()"
										onfocus="clearScreen('phonenumErr')">
								</div>
							</div>
						</div>
						<div class="col-xs-5"
							style="font-size: 14px; padding: 32px 0px 0px 65px">请输入11位数字</div>
						<div class="col-xs-2 text-center"
							style="color: red; font-size: 5px; padding: 32px 0px 0px 0px">
							<div id="phonenumErr" class="errTxt"></div>
						</div>
					</div>
					<div class="row">
						<div class="col-xs-5">
							<div class="form-group   has-feedback">
								<label for="useremail">用户Email:</label>
								<div class="input-group" style="width: 115%">
									<input id="useremail" class="form-control" maxlength="20"
										type="text" onblur="checkuseremail()"
										onfocus="clearScreen('useremailErr')">
								</div>
							</div>
						</div>
						<div class="col-xs-5"
							style="font-size: 14px; padding: 32px 0px 0px 65px">
							请输入您的邮箱</div>
						<div class="col-xs-2 text-center"
							style="color: red; font-size: 5px; padding: 32px 0px 0px 0px">
							<div id="useremailErr" class="errTxt"></div>
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="row"
			style="text-align: center; border: 1px solid #C6DEEB;">
			<div class="form-group  form-inline"
				style="top: 4px; position: relative;">
				<input class="form-control btn btn-primary" id="submit" value="注册"
					type="submit" style="width: auto;"> <input value="重置"
					id="reset" class="form-control btn btn-danger" onclick=""
					type="reset" style="width: auto;">
			</div>
			<div class="form-group  form-inline" style="position: relative;">
				已有账号？<a href="index.html">点此登录</a>
			</div>
		</div>
		<div class="row"
			style="height: 100%; border: 0px solid darkgrey; text-align: center;">
			<div class="row"
				style="height: 1px; background-color: #004C8F; text-align: center;">
				<p style="height: 2px; color: whitesmoke; font-size: 14px;"></p>
			</div>
			<div
				style="color: black; margin-right: 50px; margin-top: 20px; font-size: 12px; text-align: center">
				<ul>
					<h>北京交通大学计算机与信息技术学院</h>
					<br />
					<h>云计算与数据科学研究所</h>
					<br />
					<h>北京市海淀区西直门外上园村3号</h>
					<br />
					<h>电话： 51683859&nbsp;&nbsp;&nbsp;&nbsp;邮编：100044</h>
					<br />
				</ul>
			</div>
		</div>
		<div id="register" class="modal fade bs-example-modal-sm"
			tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel">
			<div class="modal-dialog" role="document">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal"
							aria-label="Close">
							<span aria-hidden="true">&times;</span>
						</button>
						<h4 class="modal-title">注册提示信息</h4>
					</div>
					<div class="modal-body">
						<p>注册成功，请联系系统管理员获得授权</p>
					</div>
					<div class="modal-footer">
						<!-- <button type="button" class="btn btn-default" data-dismiss="modal">取消</button> -->
						<button type="button" id="successbtu"
							class="btn btn-default confirm">确定</button>
					</div>
				</div>
			</div>
		</div>

		<div id="error" class="modal fade bs-example-modal-sm" tabindex="-1"
			role="dialog" aria-labelledby="mySmallModalLabel">
			<div class="modal-dialog" role="document">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal"
							aria-label="Close">
							<span aria-hidden="true">&times;</span>
						</button>
						<h4 class="modal-title">注册提示信息</h4>
					</div>
					<div class="modal-body">
						<p>注册失败，请重新注册</p>
					</div>
					<div class="modal-footer">
						<!-- <button type="button" class="btn btn-default" data-dismiss="modal">取消</button> -->
						<button type="button" id="errorbtu"
							class="btn btn-default confirm">确定</button>
					</div>
				</div>
			</div>
		</div>

		<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
		<script src="js/jquery-2.0.3.min.js"></script>
		<script src="js/jquery.cookie.js"></script>
		<!-- Include all compiled plugins (below), or include individual files as needed -->
		<script src="js/bootstrap.min.js"></script>
		<script>
            $(document).ready(function(){
                //alert("hello");
                $.ajax({
                    type : "Post",
                    contentType : "application/json",
                    dataType : 'json',
                    url : '/ma/team/getNewTeamNo',
                    success : function(data) {
                        //alert(data)
						$("#teamno").val(data);
						$("#userno").val(data+"00");
                        //$('#register').modal();
                        /* window.location.href = 'index.html'; */
                    }
                });
            });
            function showTips() {
                alert("请发送请求至邮箱 19125199@bjtu.edu.cn ")
            }
        </script>
		<script>
			
			var teamnameCheck;
			var maxCheck;
			var usernameCheck;
			var passwordCheck;
			var password2Check;
			var idnumCheck;
			var phonenumCheck;
			var useremailCheck;
			
			function isTelCode(str) {
				var reg = /^((0\d{2,3}-\d{7,8})|(1[3584]\d{9}))$/;
				return reg.test(str);
			}
			
			//本函数验证团队号是否合法
			/* function checkteamno() { 
				var str = document.getElementById('teamno').value;
				//在JavaScript中，正则表达式只能使用"/"开头和结束，不能使用双引号
				var reg = /^[\da-zA-Z]{10}$/;
				if (reg.test(str)) {
					check1 = 1;
					document.getElementById("emailErr1").innerHTML = "<i class='glyphicon glyphicon-ok' style='color:green'></i>";
					return true;
				} else {
					check1 = 0;
					document.getElementById("emailErr1").innerHTML = "<i class='glyphicon glyphicon-remove'></i>";
					return false;
				}
			} */
			
			// 检查身份证号
			function checkId() {
				var str = document.getElementById('idnum').value;

				var reg = /^\d{6}(18|19|20)?\d{2}(0[1-9]|1[012])(0[1-9]|[12]\d|3[01])\d{3}(\d|[xX])$/;
				if (reg.test(str)) {
					idnumCheck = 1;
					document.getElementById("idnumErr").innerHTML = "<i class='glyphicon glyphicon-ok' style='color:green'></i>";
					return true;
				} else {
					idnumCheck3 = 0;
					document.getElementById("idnumErr").innerHTML = "<i class='glyphicon glyphicon-remove'></i>";
					return false;
				}
			}
			
			// 检查电话
			function checkTel() {
				var str = document.getElementById('phonenum').value;
		
				var reg = /^1\d{10}$/;
				if (reg.test(str)) {
					phonenumCheck = 1;
					document.getElementById("phonenumErr").innerHTML = "<i class='glyphicon glyphicon-ok' style='color:green'></i>";
					return true;
				} else {
					phonenumCheck = 0;
					document.getElementById("phonenumErr").innerHTML = "<i class='glyphicon glyphicon-remove'></i>";
					return false;
				}
			}
			
			// 检查最大值
			function checkmax() {
				var str = document.getElementById('max').value;
		
				if (str > 0 && str < 100) {
					maxCheck = 1;
					document.getElementById("maxErr").innerHTML = "<i class='glyphicon glyphicon-ok' style='color:green'></i>";
					return true;
				} else {
					maxCheck = 0;
					document.getElementById("maxErr").innerHTML = "<i class='glyphicon glyphicon-remove'></i>";
					return false;
				}
			}
			
			// 检查密码
			function checkpas() {
				var str = document.getElementById('password').value;
				//在JavaScript中，正则表达式只能使用"/"开头和结束，不能使用双引号
				var reg = /^[0-9A-Za-z]{4,8}$/;
				if (reg.test(str)) {
					passwordCheck = 1;
					document.getElementById("passwordErr").innerHTML = "<i class='glyphicon glyphicon-ok' style='color:green'></i>";
					return true;
				} else {
					passwordCheck = 0;
					document.getElementById("passwordErr").innerHTML = "<i class='glyphicon glyphicon-remove'></i>";
					return false;
				}
			}
			
			// 检查团队邮箱
			function checkTeamEmail(){
				var str = document.getElementById('useremail').value;
				//在JavaScript中，正则表达式只能使用"/"开头和结束，不能使用双引号
				var reg =/^\w+@[a-z0-9]+\.[a-z\.]+$/;
				
				if (reg.test(str)) {
					var teamEmail = $("#teamemail").val();
					$.ajax({
						type : "Post",
						contentType : "application/json",
						data : JSON.stringify({"teamEmail": teamEmail}),
						dataType : 'json',
						url : '/ma/team/checkTeamEmail',
						success : function(data) {
							d = eval(data)
							if (d['data'] == "y"){
								teamemailCheck = 1;
								document.getElementById("teamemailErr").innerHTML = "<i class='glyphicon glyphicon-ok' style='color:green'></i>";
								return true;
							}else{
								teamemailCheck = 0;
								clearScreen('teamemail')
								alert('已存在该邮箱，请重新输入！')
								return false;
							}
						}
					});
					return false;
				} else {
					teamemailCheck = 0;
					document.getElementById("teamemailErr").innerHTML = "<i class='glyphicon glyphicon-remove'></i>";
					return false;
				}
			}
			
			// 检查用户邮箱
			function checkuseremail() {
				var str = document.getElementById('useremail').value;
				//在JavaScript中，正则表达式只能使用"/"开头和结束，不能使用双引号
				var reg =/^\w+@[a-z0-9]+\.[a-z\.]+$/;
				if (reg.test(str)) {
					var userEmail = $("#useremail").val();
					$.ajax({
						type : "Post",
						contentType : "application/json",
						data : JSON.stringify({"userEmail": userEmail}),
						dataType : 'json',
						url : '/ma/user/checkUserEmail',
						success : function(data) {
							d = eval(data)
							if (d['data'] == "y"){
								useremailCheck = 1;
								document.getElementById("useremailErr").innerHTML = "<i class='glyphicon glyphicon-ok' style='color:green'></i>";
								return true;
							}else{
								useremailCheck = 0;
								clearScreen('useremail')
								alert('已存在该邮箱，请重新输入！')
								return false;
							}
						}
					});
					return false;
				} else {
					useremailCheck = 0;
					document.getElementById("useremailErr").innerHTML = "<i class='glyphicon glyphicon-remove'></i>";
					return false;
				}
			}
			
			// 检查团队名
			function checkteamname() {
				var str = document.getElementById('teamname').value;
				//在JavaScript中，正则表达式只能使用"/"开头和结束，不能使用双引号
				var reg = /^[0-9a-zA-Z\u4e00-\u9fa5_]{1,10}$/;
				if (reg.test(str)) {
					teamnameCheck = 1;
					document.getElementById("teamnameErr").innerHTML = "<i class='glyphicon glyphicon-ok' style='color:green'></i>";
					return true;
				} else {
					teamnameCheck = 0;
					document.getElementById("teamnameErr").innerHTML = "<i class='glyphicon glyphicon-remove'></i>";
					return false;
				}
			}
			
			// 检查用户名
			function checkusername() {
				var str = document.getElementById('username').value;
				//在JavaScript中，正则表达式只能使用"/"开头和结束，不能使用双引号
				/* var reg = /^[\u4e00-\u9fa5 ]{2,20}$/; */
				var reg = /^[0-9a-zA-Z\u4e00-\u9fa5_]{1,10}$/;
				if (reg.test(str)) {
					usernameCheck = 1;
					document.getElementById("usernameErr").innerHTML = "<i class='glyphicon glyphicon-ok' style='color:green'></i>";
					return true;
				} else {
					usernameCheck = 0;
					document.getElementById("usernameErr").innerHTML = "<i class='glyphicon glyphicon-remove'></i>";
					return false;
				}
			}
			
			// 本函数二次验证密码
			function checkpas2() { 
				var str = document.getElementById('password2').value;
				var str1 = document.getElementById('password').value;
				//在JavaScript中，正则表达式只能使用"/"开头和结束，不能使用双引号
				if (str == str1) {
					password2Check = 1;
					document.getElementById("password2Err").innerHTML = "<i class='glyphicon glyphicon-ok' style='color:green'></i>";
					return true;
				} else {
					password2Check = 0;
					document.getElementById("password2Err").innerHTML = "<i class='glyphicon glyphicon-remove'></i>";
					return false;
				}
			}
			
			// 清除内容
			function clearScreen(nameval) {
				document.getElementById(nameval).style = "none";
				document.getElementById(nameval).innerHTML = "";
			}
			
			$('#successbtu').click(function(e){
				$('#register').modal('hide');
				 window.location.href = 'index.html'; 
				
			});			
			$('#errorbtu').click(function(e){
				
				$('#error').modal('hide');
			});
			
			// 注册函数
			$('#submit').click(function() {
				// 可空： phonenumCheck
				if (teamnameCheck && usernameCheck && 
					passwordCheck && password2Check && 
					idnumCheck && useremailCheck) {
					
					var teamno = $("#teamno").val();
					var teamname = $("#teamname").val();
					var max = $("#max").val();
					var userno = $("#userno").val();
					var username = $("#username").val();
					var password = $("#password").val();
					var idnum = $("#idnum").val();
					var phonenum = $("#phonenum").val();
					var useremail = $("#useremail").val();
					$.ajax({
						type: "POST",
						url: "/ma/team/addTeamAndAdmin",
						contentType: "application/json;charset=utf-8",
						data:JSON.stringify({
							"teamNo": teamno,
							"teamName": teamname,
							"maxNum": max,
							"userNo": userno,
							"iDNo": idnum,
							"password": password,
							"userName" : username,
							"userPhone" : phonenum,
							"userEmail" : useremail,
							"userRole" : "1"
						}),
						dataType: "json",
						success:function (message) {
							// JSON.stringify(message) 将resultMap转换成字典 === eval(message)
							$('#register').modal();
						},
						error:function (message) {
							alert("注册失败\n错误信息：\n"+JSON.stringify(message));
						}
					});
				}else{
					alert('您还有未完成的输入！')
					/* alert(teamnameCheck);
					alert(maxCheck);
					alert(teamemailCheck);
					alert(usernameCheck);
					alert(passwordCheck);
					alert(password2Check);
					alert(idnumCheck);
					alert(phonenumCheck);
					alert(useremailCheck); */
				}




				// var data = $("input[name='mainRole']:checked").val();
				// if (data === '独立用户') {
				// 	if (check3 && check4 && check6 && check8 && check10) {
				// 		var userno = $("#userno").val();
				// 		var idNum = $("#idNum").val();
				// 		var username = $("#username").val();
				// 		var phonenum = $("#phoneNum").val();
				// 		var userEmail = $("#userEmail").val();
				// 		var userRole = $('#userrole option:selected').val();
				// 		$.ajax({
				// 			type: "POST",
				// 			url: "/ma/user/addteamuser",
				// 			contentType: "application/json;charset=utf-8",
				// 			data:JSON.stringify({
				// 				"userNo": userno,
				// 				"iDNo": idNum,
				// 				"password": userno,
				// 				"userName" : username,
				// 				"userPhone" : phonenum,
				// 				"userEmail" : userEmail,
				// 				"userRole" : userRole
				// 			}),
				// 			dataType: "json",
				// 			success:function (message) {
				// 				alert("注册成功"+JSON.stringify(message));
				// 			},
				// 			error:function (message) {
				// 				alert("注册失败"+JSON.stringify(message));
				// 			}
				// 		});
				// }else{
				// 	if (check1 && check2 && check4 && check5 && check6 && check7 && check8 && check9 && check10) {
				// 		var userno = $("#userno").val();
				// 		var username = $("#username").val();
				// 		var password = $("#password").val();
				// 		var phonenum = $("#phoneNum").val();
				// 		var userEmail = $("#userEmail").val();
				// 		var max = $("#max").val();
				// 		var teamno = $("#teamno").val();
				// 		var teamname = $("#teamname").val();
				// 		/* var teamemail = $("#teamemail").val(); */
				// 		var userRole = "c";
				// 		if (max == 1) {
				// 			teamno = userno;
				// 			teamname = username;
				// 			userRole = "b";
				// 		}
				// 		$.ajax({
				// 			type : "Post",
				// 			contentType : "application/json",
				// 			data : '{"userNo":"' + userno + '","userName":"' + username + '","password":"' + password + '","userPhone":"' + phonenum + '","userEmail":"' + userEmail + '","maxNum":"' + max + '","teamNo":"' + teamno + '","teamName":"' + teamname + '","userTeamNo":"' + teamno + '","userRole":"' + userRole + '"}',
				// 			dataType : 'json',
				// 			url : '/ma/user/insert',
				// 			success : function(data) {
				// 				$('#register').modal();
				// 				/* window.location.href = 'index.html'; */
				// 			}
				// 		});
				//
				// 	} else {
				// 		$('#error').modal();
				// 		/* document.getElementById("userno").value = "";
                //         document.getElementById("username").value = ""; */
				// 		document.getElementById("password").value = "";
				// 		document.getElementById("password2").value = "";
				// 		/* document.getElementById("phoneNum").value = "";
                //         document.getElementById("userEmail").value = "";
                //         document.getElementById("teamno").value = "";
                //         document.getElementById("teamname").value = ""; */
				// 		/* document.getElementById("teamemail").value = ""; */
				// 		/* document.getElementById("max").value = ""; */
				// 		document.getElementById("emailErr1").innerHTML = "";
				// 		document.getElementById("emailErr2").innerHTML = "";
				// 		/* document.getElementById("emailErr3").innerHTML = ""; */
				// 		document.getElementById("emailErr4").innerHTML = "";
				// 		document.getElementById("emailErr5").innerHTML = "";
				// 		document.getElementById("emailErr6").innerHTML = "";
				// 		document.getElementById("emailErr7").innerHTML = "";
				// 		document.getElementById("emailErr8").innerHTML = "";
				// 		document.getElementById("emailErr9").innerHTML = "";
				// 		document.getElementById("emailErr10").innerHTML = "";
				// 	}
				// }

				// var data = $("input[name='mainRole']:checked").val();
				// alert('测试：'+data)
				//}
			});
			$('#reset').click(function(e) {
				document.getElementById("userno").value = "";
				document.getElementById("username").value = "";
				document.getElementById("password").value = "";
				document.getElementById("password2").value = "";
				document.getElementById("phonenum").value = "";
				document.getElementById("useremail").value = "";
				document.getElementById("teamemail").value = "";
				document.getElementById("teamno").value = "";
				document.getElementById("teamname").value = "";
				document.getElementById("max").value = "";
				document.getElementById("idnum").value = "";
				document.getElementById("emailErr1").innerHTML = "";
				document.getElementById("emailErr2").innerHTML = "";
				document.getElementById("emailErr3").innerHTML = "";
				document.getElementById("emailErr4").innerHTML = "";
				document.getElementById("emailErr5").innerHTML = "";
				document.getElementById("emailErr6").innerHTML = "";
				document.getElementById("emailErr7").innerHTML = "";
				document.getElementById("emailErr8").innerHTML = "";
				document.getElementById("emailErr9").innerHTML = "";
				document.getElementById("emailErr10").innerHTML = "";
				document.getElementById("emailErr11").innerHTML = "";
		
		
			});
			$('#optionsRadios1').click(function(e) {
				//document.getElementById("max").value = 1;
				check1 = 1;
				check2 = 1;
				/* check3 = 1; */
				check4 = 1;
				$('#teamno').attr('disabled', true);
				$('#teamname').attr('disabled', true);
				$('#idcode-btn').attr('disabled', true);
				$('#max').attr('disabled', true);
                $('#loadingButton').attr('disabled', true);
		
			});
			$('#optionsRadios2').click(function(e) {
				check1 = 0;
				check2 = 0;
				/* check3 = 0; */
				check4 = 0;
				document.getElementById("max").value = "";
				$('#teamno').attr('disabled', false);
				$('#teamname').attr('disabled', false);
			    $('#idcode-btn').attr('disabled', false);
				$('#max').attr('disabled', false);
                $('#loadingButton').attr('disabled', false);
		
			});

		</script>
	</div>
</body>

</html>